-content_for :widget_title do
  Control Info

-content_for :widget_help, 'control_info'

-content_for :widget_id, "control_info_widget"

%ul.info-list
  %li.float-element
    %label
      Code
    %span
      %strong=control.slug
  -if control.title !=""
    %li.float-element
      %label
        Title
      %span
        %strong=control.title
  -if control.kind
    %li.float-element
      %label
        Kind
      %span
        =control.kind.title
  %li
    %label
      Description
    -if control.description != ""
      =display_as_html control.description
    -else
      .rtf
        %p.no-data no description available
  %li.float-element
    %label
      Fraud-related
    %span
      =control.fraud_related ? 'Yes' : 'No'
  %li.float-element
    %label
      Significance
    %span
      =control.key_control ? 'Key' : 'Non-key'
  -if control.assertions.count > 0
    %li.float-element
      %label
        Assertions
      %span
        =control.assertions.map(&:name).join(', ')
  -if control.means
    %li.float-element
      %label
        Means of Operation
      %span
        =control.means && control.means.title
  -if control.verify_frequency
    %li.float-element
      %label
        Confirm Frequency
      %span
        =control.verify_frequency && control.verify_frequency.title
  -if control.notes != ""
    %li
      %label
        Notes
      =display_as_html control.notes
  -if control.url.present?
    %li.float-element
      %label
        Direct Link
      %span
        =link_to(control.url, absolute_url(control.url), :target => "_blank", :class => "inner-element")
  -if control.start_date
    %li.float-element
      %label
        Effective Date
      %span
        =control.start_date.strftime("%m/%d/%y")
  -if control.stop_date
    %li.float-element
      %label
        Stop Date
      %span
        =control.stop_date.strftime("%m/%d/%y")

%section.footer
  .row-fluid
    .span6
      %p.footer-left
        Created: #{control.created_at.strftime("%m/%d/%y")}
    .span6
